package com.test.controller.Admininfo;

import lombok.Data;

import java.util.List;

@Data
public class ResData {

    private String msg;

    private Integer code;

    private List<MyObject> list; //数据列

    private Integer count;//总条数

    private Integer totalPage;//总页数

    public ResData() {
    }

    public ResData(String msg, Integer code) {
        this.msg = msg;
        this.code = code;
    }

    public ResData(ResCode resCode) {
        this.msg = resCode.getMsg();
        this.code = resCode.getCode();
    }

    public ResData(ResCode resCode, List<MyObject> list, Integer count, Integer totalPage) {
        this.msg = resCode.getMsg();
        this.code = resCode.getCode();
        this.list = list;
        this.count = count;
        this.totalPage = totalPage;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public List<MyObject> getList() {
        return list;
    }

    public void setList(List<MyObject> list) {
        this.list = list;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Integer getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(Integer totalPage) {
        this.totalPage = totalPage;
    }
}
